package idiet.service;

import idiet.bean.CurrentId;
import idiet.dao.hibernate.CurrentIdDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("currentIdService")
public class CurrentIdService {
	@Autowired
	CurrentIdDao currentIdDao;
	public CurrentId getCurrentIdById(int currentIdId){
		return this.currentIdDao.getCurrentIdById(currentIdId);
	}
	public CurrentId getCurrentIdsByCurrentIdName(String tableName){
		if(tableName==null){
			return null;
		}else{
			return this.currentIdDao.getCurrentIdsByTableName(tableName);
		}
	}
	public void createCurrentId(CurrentId currentId){
		this.currentIdDao.createCurrentId(currentId);
	}
	public void updateCurrentId(CurrentId currentId){
		this.currentIdDao.updateCurrentId(currentId);
	}
	public void deleteCurrentId(CurrentId currentId){
		this.currentIdDao.deleteCurrentId(currentId);
	}
}
